package com.angel.architecture.daos.impl;

import java.util.Date;
import java.util.List;

import com.angel.architecture.persistence.ids.ObjectId;
import com.angel.dao.generic.impl.GenericSpringHibernateDAO;
import com.angel.io.daos.ProcessorLogDAO;
import com.angel.io.log.ProcessorLog;

/**
 *
 * @author William
 * @since 08/April/2009
 *
 */
public class ProcessorLogSpringHibernateDAO extends GenericSpringHibernateDAO<ProcessorLog, ObjectId> implements ProcessorLogDAO {

    public ProcessorLogSpringHibernateDAO(){
        super(ProcessorLog.class, ObjectId.class);
    }

	public List<ProcessorLog> findAllByEndProcessDate(Date endProcess) {
		return (List<ProcessorLog>) super.findAll("endProcess", endProcess);
	}

	public List<ProcessorLog> findAllByStartProcessDate(Date starProcess) {
		return (List<ProcessorLog>) super.findAll("startProcess", starProcess);
	}

	public ProcessorLog findByName(String name) {
		return super.findUnique("name", name);
	}
}
